package com.ionehe.group.common.uaa.ex.application.converter;

import com.ionehe.group.common.uaa.ex.application.model.CustomerInfoVO;
import com.ionehe.group.common.uaa.ex.dto.CustomerInfoDTO;
import com.ionehe.group.common.uaa.ex.model.UaaCustomerInfo;
import org.mapstruct.Mapper;

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;
import java.util.List;

/**
 * Copyright (c) 2020 ionehe.com
 * Date: 2020/11/26 0026
 * Time: 15:35
 *
 * @author 2020年 <a href="mailto:a@ionehe.com">秀</a>
 */

@Mapper(componentModel = "spring",imports = {LocalDateTime.class, Date.class, ZoneId.class})//交给spring管理
public interface CustomerConverter {

    CustomerInfoDTO vo2dto(CustomerInfoVO customerInfoVO);

    CustomerInfoDTO do2dto (UaaCustomerInfo customerInfo);

    List<CustomerInfoDTO> do2dto (List<UaaCustomerInfo> customerInfoList);

    CustomerInfoVO dto2vo(CustomerInfoDTO customerInfoDTO);

    List<CustomerInfoVO> dto2vo(List<CustomerInfoDTO> customerInfoDTO);

    UaaCustomerInfo dto2do(CustomerInfoDTO customerInfoDTO);
}